<!--
 * @Descripttion: 
 * @version: 
 * @Author: wtzhang
 * @Date: 2021-09-23 13:46:07
 * @LastEditors: wtzhang
 * @LastEditTime: 2021-09-23 16:46:40
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  #parent {
    /* 给父级盒子一个高度，解决高度坍塌 */
    /* height: 200px; */
    overflow: hidden;
    zoom: 1;
    
    margin-left: 200px;
    margin-right: 200px;
    overflow: hidden;
    zoom: 1;
  }
  #left {
    width: 200px;
    background-color: blueviolet;
    margin-left: -100%;
    position: relative;
    left: -200px;
  }

  #center {
    /* 为父级元素的100% */
    width: 100%;
    background-color: cadetblue;
  }

  #right {
    width: 200px;
    background-color: coral;
    margin-right: -100%;
    position: relative;
    /* right: -200px; */
  }
  #left,#center, #right {
    float: left;
    height: 200px;
  }
</style>
<body>
  <div id="parent">
    <div id="center"></div>
    <div id="left"></div>
    <div id="right"></div>
  </div>
</body>
</html>